package com.qf;

import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * author:z
 * time:2022/1/5 22:37
 * description:
 */
public class MyJob implements Job {
    @Override
    public void execute(JobExecutionContext Context) throws JobExecutionException {
        System.out.println("=====定时任务执行了=====");
        //获取定时任务的详情对象
        JobDetail jobDetail = Context.getJobDetail();
        String name = jobDetail.getKey().getName();
        String group = jobDetail.getKey().getGroup();
        System.out.println("name:"+name+"================"+"group:"+group);
//        System.out.println("=====定时任务执行结束=====");
    }
}
